<template>
  <el-pagination
      v-model:current-page="queryParams.current"
      v-model:page-size="queryParams.size"
      :page-sizes="[10, 20, 30, 40]"
      layout="total, sizes, prev, pager, next, jumper"
      :total="queryParams.total"
      @size-change="getListPage"
      @current-change="getListPage"
  />
</template>

<script setup>
import {computed, defineProps} from 'vue'
import {valueEquals} from "element-plus";
const props = defineProps({
  modelValue:{
    default : function (){
      return {
        current: 0,
        size: 20,
        total: 0
      }
    }
  }
})
const emits = defineEmits(['update:modelValue', 'selectPage'])
const queryParams = computed({
  get(){
    return props.modelValue
  },
  set(value){
    emits('update:modelValue', value)
  }
})

const getListPage = function () {
  emits('selectPage')
}

</script>

<style scoped>

</style>